<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>专家入驻申请</title>
		<link rel="stylesheet" href="../css/settle.css" />
		<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	</head>
	<body>
		<!-- header顶部标语、登陆注册 -->
	<header>
		<div class="header-top">
			<div class="container">
				<div class="row">
					<div class="header-top-left">
						<div class="welcome-msg"><span>欢迎来到四川大学科技成果交易平台!</span></div>
					</div>
					<div class="header-top-right">
						<ul class="header-links">
							<li><a href="http://123.207.115.103:8100/index">首页</a></li>
							<li><a href="http://123.207.115.103:8100/about">关于</a></li>
                		</ul>
					</div>
				</div>
			</div>
		</div>
	</header>
	<div class="content">
		<div class="form">
				<p class="form-type">专家入驻申请</p>
				<label>
					<span class="title">您的姓名:</span>
					<span class="field"><input type="text" name="name" id="name"></span>
				</label>
				<label>
					<span class="title">您的身份证号:</span>
					<span class="field"><input type="text" name="idNumber" id="idNumber"></span>
				</label>
				<label>
					<span>研究领域:</span><span>
					<select id="field" name="field">
						<option>请选择领域</option>
					</select>
					<select id="category" name="category">
						<option>请选择类别</option>
					</select>
				</span>
				</label>
				<label>
					<span class="title">您的工作单位:</span>
					<span class="field"><input type="text" name="institutions" id="institutions"></span>
				</label>
				<label>
					<span class="title">您的职称:</span>
					<span class="field"><input type="text" name="title" id="title"></span>
				</label>
				<label>
					<span class="title">1存证件照</span>
					<span class="field"><input type="file" name="photo" id="photo"></span>
				</label>
				<div class="to-settle">
					<button class="style-bottom" id="specialist-apply">申请入驻</button>
				</div>
		</div>
	</div>
	<script type="text/javascript">
		$("#specialist-apply").click(function () {
			console.log("#specialist-apply click")
            var form=new FormData();
            form.append("name",$("#name").val());
            form.append("idNumber",$("#idNumber").val());
            form.append("field",$("#field").val());
            form.append("category",$("#category").val());
            form.append("institutions",$("#institutions").val());
            form.append("title",$("#title").val());
            form.append("photo",$("#photo")[0].files[0]);
            $.ajax({
                type: 'post',
                url:'specialistSettlePost',
                data:form,
                processData: false,
                contentType: false,
                success: function (data) {
                    alert(data);
                    setTimeout(function () {
                        location.href="http://123.207.115.103:8100/index";
                    },1000);
                },
                error: function () {
                }
            });
        })
	</script>

	</body>
	<script src="js/settle.js"></script>	
</html>
